<?php 
$listSanPham=$this->listSanPham;
$pageNumber=$this->pageNumber;


?>

<div class="center_title_bar">Quản lý sản phẩm</div>
    <div class="prod_box_big">
        <div class="top_prod_box_big"></div>
        <div class="center_prod_box_big">
			<table border="1" id="myTable" style="width: 540px;margin-left: 7px;margin-top: -5px;">
				<thead>
					<tr>
						<td width="30">STT</td>
						<td width="130">Tên sản phẩm</td>
						<td >Danh mục</td>
						<td width="50">Giá bán</td>
						<td width="170">Chức năng</td>
					</tr>
				</thead>
				<tbody>
				<?php 
				$i=0;
					foreach ($listSanPham as $value) {
						$i++;
						$classname='tr1';
						if($i%2==0) $classname='tr2';
						$value instanceof Application_Model_bean_SanPham;
						?>
						<tr class="<?php echo $classname?>">
						<td align="center"><?php echo $i?></td>
						<td><?php echo $value->getTenSanPham()?></td>
						<td><?php 
						//lay ten danh muc
						$service=Application_Model_service_DanhMucService::getInstance();
						$service instanceof Application_Model_serviceInf_DanhMucServiceInf;
						$danhMuc=$service->loadMotDanhMucSanPham($value->getMaDanhMuc());
						$danhMuc instanceof Application_Model_bean_DanhMucSanPham;
						echo $danhMuc->getTen()?>
						
						</td>
						<td align="right"><?php echo $value->getGiaBan().'$'?></td>
						<td align="center">
						<a href="#" title="header=[xóa] body=[&nbsp;] fade=[on]" class="tootbarButton"><img src="../images/delete.png" alt="" border="0" class="left_bt" /></a>
						<a href="#" title="header=[update hình] body=[&nbsp;] fade=[on]" class="tootbarButton"><img src="../images/uppic.png" alt="" border="0" class="left_bt" /></a>
						<a href="#" title="header=[update chức năng] body=[&nbsp;] fade=[on]" class="tootbarButton"><img src="../images/udchucnang.png" alt="" border="0" class="left_bt" /></a>
						<a href="../sanpham/update-thong-tin-chung?ct=sanpham&act=quanlysanpham&id=<?php echo $value->getMaSanPham()?>" title="header=[update thông tin chung] body=[&nbsp;] fade=[on]" class="tootbarButton"><img src="../images/info.png" alt="" border="0" class="left_bt" /></a>
						<a href="#" title="header=[update bài viết] body=[&nbsp;] fade=[on]" class="tootbarButton"><img src="../images/uddocument.png" alt="" border="0" class="left_bt" /></a>
						<a href="#" title="header=[update giá bán] body=[&nbsp;] fade=[on]" class="tootbarButton"><img src="../images/usd.png" alt="" border="0" class="left_bt" /></a>
						</td>
						</tr>
						<?php 
					}
				?>
				</tbody>
			</table>
        </div>
        <div class="bottom_prod_box_big"></div>
      </div>